Optimal. Leaf size=84 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 \sqrt {a} (a-b)^{3/2} d}+\frac {\cosh (c+d x) \sinh (c+d x)}{2 (a-b) d \left (a+b \sinh ^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3252, 12, 3260,
214} \begin {gather*} \frac {\sinh (c+d x) \cosh (c+d x)}{2 d (a-b) \left (a+b \sinh ^2(c+d x)\right )}-\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 \sqrt {a} d (a-b)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 3252
Rule 3260
Rubi steps
\begin {align*} \int \frac {\sinh ^2(c+d x)}{\left (a+b \sinh ^2(c+d x)\right )^2} \, dx &=\frac {\cosh (c+d x) \sinh (c+d x)}{2 (a-b) d \left (a+b \sinh ^2(c+d x)\right )}-\frac {\int \frac {a}{a+b \sinh ^2(c+d x)} \, dx}{2 a (a-b)}\\ &=\frac {\cosh (c+d x) \sinh (c+d x)}{2 (a-b) d \left (a+b \sinh ^2(c+d x)\right )}-\frac {\int \frac {1}{a+b \sinh ^2(c+d x)} \, dx}{2 (a-b)}\\ &=\frac {\cosh (c+d x) \sinh (c+d x)}{2 (a-b) d \left (a+b \sinh ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {1}{a-(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{2 (a-b) d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 \sqrt {a} (a-b)^{3/2} d}+\frac {\cosh (c+d x) \sinh (c+d x)}{2 (a-b) d \left (a+b \sinh ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.29, size = 81, normalized size = 0.96 \begin {gather*} \frac {-\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2}}+\frac {\sinh (2 (c+d x))}{(a-b) (2 a-b+b \cosh (2 (c+d x)))}}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(274\) vs.
\(2(72)=144\).
time = 0.99, size = 275, normalized size = 3.27
method | result | size |
risch | \(-\frac {2 a \,{\mathrm e}^{2 d x +2 c}-b \,{\mathrm e}^{2 d x +2 c}+b}{b d \left (a -b \right ) \left (b \,{\mathrm e}^{4 d x +4 c}+4 a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}+b \right )}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{4 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{4 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}\) | \(248\) |
derivativedivides | \(\frac {-\frac {8 \left (-\frac {\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a -b \right )}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a -b \right )}\right )}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a}-\frac {a \left (\frac {\left (-\sqrt {-b \left (a -b \right )}-b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 \sqrt {-b \left (a -b \right )}\, a \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (-\sqrt {-b \left (a -b \right )}+b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}}{d}\) | \(275\) |
default | \(\frac {-\frac {8 \left (-\frac {\tanh ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a -b \right )}-\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (a -b \right )}\right )}{a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a}-\frac {a \left (\frac {\left (-\sqrt {-b \left (a -b \right )}-b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 \sqrt {-b \left (a -b \right )}\, a \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (-\sqrt {-b \left (a -b \right )}+b \right ) \arctanh \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}}{d}\) | \(275\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 634 vs.
\(2 (72) = 144\).
time = 0.44, size = 1523, normalized size = 18.13 \begin {gather*} \left [-\frac {4 \, a^{2} b - 4 \, a b^{2} + 4 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \cosh \left (d x + c\right )^{2} + 8 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + 4 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \sinh \left (d x + c\right )^{2} + {\left (b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \sqrt {a^{2} - a b} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {a^{2} - a b}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right )}{4 \, {\left ({\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{2} + {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d\right )} \sinh \left (d x + c\right )^{2} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d + 4 \, {\left ({\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{3} + {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )}}, -\frac {2 \, a^{2} b - 2 \, a b^{2} + 2 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \cosh \left (d x + c\right )^{2} + 4 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + 2 \, {\left (2 \, a^{3} - 3 \, a^{2} b + a b^{2}\right )} \sinh \left (d x + c\right )^{2} - {\left (b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )} \sqrt {-a^{2} + a b} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-a^{2} + a b}}{2 \, {\left (a^{2} - a b\right )}}\right )}{2 \, {\left ({\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{4} + 4 \, {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{2} + {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d\right )} \sinh \left (d x + c\right )^{2} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d + 4 \, {\left ({\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} d \cosh \left (d x + c\right )^{3} + {\left (2 \, a^{4} b - 5 \, a^{3} b^{2} + 4 \, a^{2} b^{3} - a b^{4}\right )} d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.20, size = 135, normalized size = 1.61 \begin {gather*} -\frac {\frac {\arctan \left (\frac {b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a - b}{2 \, \sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} {\left (a - b\right )}} + \frac {2 \, {\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} - b e^{\left (2 \, d x + 2 \, c\right )} + b\right )}}{{\left (a b - b^{2}\right )} {\left (b e^{\left (4 \, d x + 4 \, c\right )} + 4 \, a e^{\left (2 \, d x + 2 \, c\right )} - 2 \, b e^{\left (2 \, d x + 2 \, c\right )} + b\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\mathrm {sinh}\left (c+d\,x\right )}^2}{{\left (b\,{\mathrm {sinh}\left (c+d\,x\right )}^2+a\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________